import * as API from '../utils/api'

export const LOAD_LOGO = 'FETCH_LOGO'
export const UPDATE_LOGO = 'UPDATE_LOGO'

export const loadLogo = () => dispatch => 
    ( 
        API.fetchLogo()
        .then(json => dispatch(updateLogo({...json})))
    )


export const updateLogo = logo => ({
    type: UPDATE_LOGO,
    logo 
})